package StudentManagementSystem;

import java.util.Objects;

public class User {
    private String username;
    private String password;
    private String personID;
    private String personPhone;

    public User(String zhangsan, String number) {
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPersonID() {
        return personID;
    }

    public void setPersonID(String personID) {
        this.personID = personID;
    }

    public String getPersonPhone() {
        return personPhone;
    }

    public void setPersonPhone(String personPhone) {
        this.personPhone = personPhone;
    }

    public User(String username, String password, String personID, String personPhone) {
        this.username = username;
        this.password = password;
        this.personID = personID;
        this.personPhone = personPhone;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(username, user.username) && Objects.equals(password, user.password) && Objects.equals(personID, user.personID) && Objects.equals(personPhone, user.personPhone);
    }

/*    @Override
    public int hashCode() {
        return Objects.hash(username, password, personID, personPhone);
    }*/

    public User() {
    }
}
